<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>splitpane.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="closure_goog_ui_splitpane.js.html">splitpane.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2007 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>/**
<a name="line16"></a> * @fileoverview  Class for splitting two areas with draggable control for
<a name="line17"></a> * changing size.
<a name="line18"></a> *
<a name="line19"></a> * The DOM that is created (or that can be decorated) looks like this:
<a name="line20"></a> * &lt;div class=&#39;goog-splitpane&#39;&gt;
<a name="line21"></a> *   &lt;div class=&#39;goog-splitpane-first-container&#39;&gt;&lt;/div&gt;
<a name="line22"></a> *   &lt;div class=&#39;goog-splitpane-second-container&#39;&gt;&lt;/div&gt;
<a name="line23"></a> *   &lt;div class=&#39;goog-splitpane-handle&#39;&gt;&lt;/div&gt;
<a name="line24"></a> * &lt;/div&gt;
<a name="line25"></a> *
<a name="line26"></a> * The content to be split goes in the first and second DIVs, the third one
<a name="line27"></a> * is for managing (and styling) the splitter handle.
<a name="line28"></a> *
<a name="line29"></a> * @see ../demos/splitpane.html
<a name="line30"></a> */
<a name="line31"></a>
<a name="line32"></a>
<a name="line33"></a>goog.provide(&#39;goog.ui.SplitPane&#39;);
<a name="line34"></a>goog.provide(&#39;goog.ui.SplitPane.Orientation&#39;);
<a name="line35"></a>
<a name="line36"></a>goog.require(&#39;goog.dom&#39;);
<a name="line37"></a>goog.require(&#39;goog.dom.classes&#39;);
<a name="line38"></a>goog.require(&#39;goog.events.EventType&#39;);
<a name="line39"></a>goog.require(&#39;goog.fx.Dragger&#39;);
<a name="line40"></a>goog.require(&#39;goog.fx.Dragger.EventType&#39;);
<a name="line41"></a>goog.require(&#39;goog.math.Rect&#39;);
<a name="line42"></a>goog.require(&#39;goog.math.Size&#39;);
<a name="line43"></a>goog.require(&#39;goog.style&#39;);
<a name="line44"></a>goog.require(&#39;goog.ui.Component&#39;);
<a name="line45"></a>goog.require(&#39;goog.ui.Component.EventType&#39;);
<a name="line46"></a>goog.require(&#39;goog.userAgent&#39;);
<a name="line47"></a>
<a name="line48"></a>
<a name="line49"></a>
<a name="line50"></a>/**
<a name="line51"></a> * A left/right up/down Container SplitPane.
<a name="line52"></a> * Create SplitPane with two goog.ui.Component opjects to split.
<a name="line53"></a> * TODO(user): Support minimum splitpane size.
<a name="line54"></a> * TODO(user): Allow component change/orientation after init.
<a name="line55"></a> * TODO(user): Support hiding either side of handle (plus handle).
<a name="line56"></a> * TODO(user): Look at setBorderBoxSize fixes and revist borderwidth code.
<a name="line57"></a> *
<a name="line58"></a> * @param {goog.ui.Component} firstComponent Left or Top component.
<a name="line59"></a> * @param {goog.ui.Component} secondComponent Right or Bottom component.
<a name="line60"></a> * @param {goog.ui.SplitPane.Orientation} orientation SplitPane orientation.
<a name="line61"></a> * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper.
<a name="line62"></a> * @extends {goog.ui.Component}
<a name="line63"></a> * @constructor
<a name="line64"></a> */
<a name="line65"></a>goog.ui.SplitPane = function(firstComponent, secondComponent, orientation,
<a name="line66"></a>    opt_domHelper) {
<a name="line67"></a>  goog.base(this, opt_domHelper);
<a name="line68"></a>
<a name="line69"></a>  /**
<a name="line70"></a>   * The orientation of the containers.
<a name="line71"></a>   * @type {goog.ui.SplitPane.Orientation}
<a name="line72"></a>   * @private
<a name="line73"></a>   */
<a name="line74"></a>  this.orientation_ = orientation;
<a name="line75"></a>
<a name="line76"></a>  /**
<a name="line77"></a>   * The left/top component.
<a name="line78"></a>   * @type {goog.ui.Component}
<a name="line79"></a>   * @private
<a name="line80"></a>   */
<a name="line81"></a>  this.firstComponent_ = firstComponent;
<a name="line82"></a>  this.addChild(firstComponent);
<a name="line83"></a>
<a name="line84"></a>  /**
<a name="line85"></a>   * The right/bottom component.
<a name="line86"></a>   * @type {goog.ui.Component}
<a name="line87"></a>   * @private
<a name="line88"></a>   */
<a name="line89"></a>  this.secondComponent_ = secondComponent;
<a name="line90"></a>  this.addChild(secondComponent);
<a name="line91"></a>};
<a name="line92"></a>goog.inherits(goog.ui.SplitPane, goog.ui.Component);
<a name="line93"></a>
<a name="line94"></a>
<a name="line95"></a>/**
<a name="line96"></a> * Events.
<a name="line97"></a> * @enum {string}
<a name="line98"></a> */
<a name="line99"></a>goog.ui.SplitPane.EventType = {
<a name="line100"></a>
<a name="line101"></a>  /**
<a name="line102"></a>   * Dispatched after handle drag.
<a name="line103"></a>   */
<a name="line104"></a>  HANDLE_DRAG: &#39;handle_drag&#39;,
<a name="line105"></a>
<a name="line106"></a>  /**
<a name="line107"></a>   * Dispatched after handle drag end.
<a name="line108"></a>   */
<a name="line109"></a>  HANDLE_DRAG_END: &#39;handle_drag_end&#39;
<a name="line110"></a>};
<a name="line111"></a>
<a name="line112"></a>
<a name="line113"></a>/**
<a name="line114"></a> * CSS class names for splitpane outer container.
<a name="line115"></a> * @type {string}
<a name="line116"></a> * @private
<a name="line117"></a> */
<a name="line118"></a>goog.ui.SplitPane.CLASS_NAME_ = goog.getCssName(&#39;goog-splitpane&#39;);
<a name="line119"></a>
<a name="line120"></a>
<a name="line121"></a>/**
<a name="line122"></a> * CSS class name for first splitpane container.
<a name="line123"></a> * @type {string}
<a name="line124"></a> * @private
<a name="line125"></a> */
<a name="line126"></a>goog.ui.SplitPane.FIRST_CONTAINER_CLASS_NAME_ =
<a name="line127"></a>    goog.getCssName(&#39;goog-splitpane-first-container&#39;);
<a name="line128"></a>
<a name="line129"></a>
<a name="line130"></a>/**
<a name="line131"></a> * CSS class name for second splitpane container.
<a name="line132"></a> * @type {string}
<a name="line133"></a> * @private
<a name="line134"></a> */
<a name="line135"></a>goog.ui.SplitPane.SECOND_CONTAINER_CLASS_NAME_ =
<a name="line136"></a>    goog.getCssName(&#39;goog-splitpane-second-container&#39;);
<a name="line137"></a>
<a name="line138"></a>
<a name="line139"></a>/**
<a name="line140"></a> * CSS class name for the splitpane handle.
<a name="line141"></a> * @type {string}
<a name="line142"></a> * @private
<a name="line143"></a> */
<a name="line144"></a>goog.ui.SplitPane.HANDLE_CLASS_NAME_ = goog.getCssName(&#39;goog-splitpane-handle&#39;);
<a name="line145"></a>
<a name="line146"></a>
<a name="line147"></a>/**
<a name="line148"></a> * CSS class name for the splitpane handle in horizontal orientation.
<a name="line149"></a> * @type {string}
<a name="line150"></a> * @private
<a name="line151"></a> */
<a name="line152"></a>goog.ui.SplitPane.HANDLE_CLASS_NAME_HORIZONTAL_ =
<a name="line153"></a>    goog.getCssName(&#39;goog-splitpane-handle-horizontal&#39;);
<a name="line154"></a>
<a name="line155"></a>
<a name="line156"></a>/**
<a name="line157"></a> * CSS class name for the splitpane handle in horizontal orientation.
<a name="line158"></a> * @type {string}
<a name="line159"></a> * @private
<a name="line160"></a> */
<a name="line161"></a>goog.ui.SplitPane.HANDLE_CLASS_NAME_VERTICAL_ =
<a name="line162"></a>    goog.getCssName(&#39;goog-splitpane-handle-vertical&#39;);
<a name="line163"></a>
<a name="line164"></a>
<a name="line165"></a>/**
<a name="line166"></a>  * The dragger to move the drag handle.
<a name="line167"></a>  * @type {goog.fx.Dragger?}
<a name="line168"></a>  * @private
<a name="line169"></a>  */
<a name="line170"></a>goog.ui.SplitPane.prototype.splitDragger_ = null;
<a name="line171"></a>
<a name="line172"></a>
<a name="line173"></a>/**
<a name="line174"></a> * The left/top component dom container.
<a name="line175"></a> * @type {Element}
<a name="line176"></a> * @private
<a name="line177"></a> */
<a name="line178"></a>goog.ui.SplitPane.prototype.firstComponentContainer_ = null;
<a name="line179"></a>
<a name="line180"></a>
<a name="line181"></a>/**
<a name="line182"></a> * The right/bottom component dom container.
<a name="line183"></a> * @type {Element}
<a name="line184"></a> * @private
<a name="line185"></a> */
<a name="line186"></a>goog.ui.SplitPane.prototype.secondComponentContainer_ = null;
<a name="line187"></a>
<a name="line188"></a>
<a name="line189"></a>/**
<a name="line190"></a> * The size (width or height) of the splitpane handle, default = 5.
<a name="line191"></a> * @type {number}
<a name="line192"></a> * @private
<a name="line193"></a> */
<a name="line194"></a>goog.ui.SplitPane.prototype.handleSize_ = 5;
<a name="line195"></a>
<a name="line196"></a>
<a name="line197"></a>/**
<a name="line198"></a> * The initial size (width or height) of the left or top component.
<a name="line199"></a> * @type {?number}
<a name="line200"></a> * @private
<a name="line201"></a> */
<a name="line202"></a>goog.ui.SplitPane.prototype.initialSize_ = null;
<a name="line203"></a>
<a name="line204"></a>
<a name="line205"></a>/**
<a name="line206"></a> * The saved size (width or height) of the left or top component on a
<a name="line207"></a> * double-click (snap).
<a name="line208"></a> * This needs to be saved so it can be restored after another double-click.
<a name="line209"></a> * @type {?number}
<a name="line210"></a> * @private
<a name="line211"></a> */
<a name="line212"></a>goog.ui.SplitPane.prototype.savedSnapSize_ = null;
<a name="line213"></a>
<a name="line214"></a>
<a name="line215"></a>/**
<a name="line216"></a> * The first component size, so we don&#39;t change it on a window resize.
<a name="line217"></a> * @type {?number}
<a name="line218"></a> * @private
<a name="line219"></a> */
<a name="line220"></a>goog.ui.SplitPane.prototype.firstComponentSize_ = null;
<a name="line221"></a>
<a name="line222"></a>
<a name="line223"></a>/**
<a name="line224"></a> * If we resize as they user moves the handle (default = true).
<a name="line225"></a> * @type {boolean}
<a name="line226"></a> * @private
<a name="line227"></a> */
<a name="line228"></a>goog.ui.SplitPane.prototype.continuousResize_ = true;
<a name="line229"></a>
<a name="line230"></a>
<a name="line231"></a>/**
<a name="line232"></a> * Iframe overlay to prevent iframes from grabbing events.
<a name="line233"></a> * @type {Element}
<a name="line234"></a> * @private
<a name="line235"></a> */
<a name="line236"></a>goog.ui.SplitPane.prototype.iframeOverlay_ = null;
<a name="line237"></a>
<a name="line238"></a>
<a name="line239"></a>/**
<a name="line240"></a> * Z indices for iframe overlay and splitter handle.
<a name="line241"></a> * @enum {number}
<a name="line242"></a> * @private
<a name="line243"></a> */
<a name="line244"></a>goog.ui.SplitPane.IframeOverlayIndex_ = {
<a name="line245"></a>  HIDDEN: -1,
<a name="line246"></a>  OVERLAY: 1,
<a name="line247"></a>  SPLITTER_HANDLE: 2
<a name="line248"></a>};
<a name="line249"></a>
<a name="line250"></a>
<a name="line251"></a>/**
<a name="line252"></a>* Orientation values for the splitpane.
<a name="line253"></a>* @enum {string}
<a name="line254"></a>*/
<a name="line255"></a>goog.ui.SplitPane.Orientation = {
<a name="line256"></a>
<a name="line257"></a>  /**
<a name="line258"></a>   * Horizontal orientation means splitter moves right-left.
<a name="line259"></a>   */
<a name="line260"></a>  HORIZONTAL: &#39;horizontal&#39;,
<a name="line261"></a>
<a name="line262"></a>  /**
<a name="line263"></a>   * Vertical orientation means splitter moves up-down.
<a name="line264"></a>   */
<a name="line265"></a>  VERTICAL: &#39;vertical&#39;
<a name="line266"></a>};
<a name="line267"></a>
<a name="line268"></a>
<a name="line269"></a>/**
<a name="line270"></a> * Create the DOM node &amp; text node needed for the splitpane.
<a name="line271"></a> * @override
<a name="line272"></a> */
<a name="line273"></a>goog.ui.SplitPane.prototype.createDom = function() {
<a name="line274"></a>  var dom = this.getDomHelper();
<a name="line275"></a>
<a name="line276"></a>  // Create the components.
<a name="line277"></a>  var firstContainer = dom.createDom(&#39;div&#39;,
<a name="line278"></a>      goog.ui.SplitPane.FIRST_CONTAINER_CLASS_NAME_);
<a name="line279"></a>  var secondContainer = dom.createDom(&#39;div&#39;,
<a name="line280"></a>      goog.ui.SplitPane.SECOND_CONTAINER_CLASS_NAME_);
<a name="line281"></a>  var splitterHandle = dom.createDom(&#39;div&#39;,
<a name="line282"></a>      goog.ui.SplitPane.HANDLE_CLASS_NAME_);
<a name="line283"></a>
<a name="line284"></a>  // Create the primary element, a DIV that holds the two containers and handle.
<a name="line285"></a>  this.setElementInternal(dom.createDom(&#39;div&#39;, goog.ui.SplitPane.CLASS_NAME_,
<a name="line286"></a>      firstContainer, secondContainer, splitterHandle));
<a name="line287"></a>
<a name="line288"></a>  this.firstComponentContainer_ = firstContainer;
<a name="line289"></a>  this.secondComponentContainer_ = secondContainer;
<a name="line290"></a>  this.splitpaneHandle_ = splitterHandle;
<a name="line291"></a>  this.setUpHandle_();
<a name="line292"></a>
<a name="line293"></a>  this.finishSetup_();
<a name="line294"></a>};
<a name="line295"></a>
<a name="line296"></a>
<a name="line297"></a>/**
<a name="line298"></a> * Determines if a given element can be decorated by this type of component.
<a name="line299"></a> * @param {Element} element Element to decorate.
<a name="line300"></a> * @return {boolean} True if the element can be decorated, false otherwise.
<a name="line301"></a> * @override
<a name="line302"></a> */
<a name="line303"></a>goog.ui.SplitPane.prototype.canDecorate = function(element) {
<a name="line304"></a>  var className = goog.ui.SplitPane.FIRST_CONTAINER_CLASS_NAME_;
<a name="line305"></a>  var firstContainer = this.getElementToDecorate_(element, className);
<a name="line306"></a>  if (!firstContainer) {
<a name="line307"></a>    return false;
<a name="line308"></a>  }
<a name="line309"></a>  // Since we have this component, save it so we don&#39;t have to get it
<a name="line310"></a>  // again in decorateInternal.  Same w/other components.
<a name="line311"></a>  this.firstComponentContainer_ = firstContainer;
<a name="line312"></a>
<a name="line313"></a>  className = goog.ui.SplitPane.SECOND_CONTAINER_CLASS_NAME_;
<a name="line314"></a>  var secondContainer = this.getElementToDecorate_(element, className);
<a name="line315"></a>
<a name="line316"></a>  if (!secondContainer) {
<a name="line317"></a>    return false;
<a name="line318"></a>  }
<a name="line319"></a>  this.secondComponentContainer_ = secondContainer;
<a name="line320"></a>
<a name="line321"></a>  className = goog.ui.SplitPane.HANDLE_CLASS_NAME_;
<a name="line322"></a>  var splitpaneHandle = this.getElementToDecorate_(element, className);
<a name="line323"></a>  if (!splitpaneHandle) {
<a name="line324"></a>    return false;
<a name="line325"></a>  }
<a name="line326"></a>  this.splitpaneHandle_ = splitpaneHandle;
<a name="line327"></a>
<a name="line328"></a>  // We found all the components we&#39;re looking for, so return true.
<a name="line329"></a>  return true;
<a name="line330"></a>};
<a name="line331"></a>
<a name="line332"></a>
<a name="line333"></a>/**
<a name="line334"></a> * Obtains the element to be decorated by class name. If multiple such elements
<a name="line335"></a> * are found, preference is given to those directly attached to the specified
<a name="line336"></a> * root element.
<a name="line337"></a> * @param {Element} rootElement The root element from which to retrieve the
<a name="line338"></a> *     element to be decorated.
<a name="line339"></a> * @param {!string} className The target class name.
<a name="line340"></a> * @return {Element} The element to decorate.
<a name="line341"></a> * @private
<a name="line342"></a> */
<a name="line343"></a>goog.ui.SplitPane.prototype.getElementToDecorate_ = function(rootElement,
<a name="line344"></a>    className) {
<a name="line345"></a>
<a name="line346"></a>  // Decorate the root element&#39;s children, if available.
<a name="line347"></a>  var childElements = goog.dom.getChildren(rootElement);
<a name="line348"></a>  for (var i = 0; i &lt; childElements.length; i++) {
<a name="line349"></a>    var childElement = childElements[i];
<a name="line350"></a>    if (goog.dom.classes.has(childElement, className)) {
<a name="line351"></a>      return childElement;
<a name="line352"></a>    }
<a name="line353"></a>  }
<a name="line354"></a>
<a name="line355"></a>  // Default to the first descendent element with the correct class.
<a name="line356"></a>  return goog.dom.getElementsByTagNameAndClass(
<a name="line357"></a>      null, className, rootElement)[0];
<a name="line358"></a>};
<a name="line359"></a>
<a name="line360"></a>
<a name="line361"></a>/**
<a name="line362"></a> * Decorates the given HTML element as a SplitPane.  Overrides {@link
<a name="line363"></a> * goog.ui.Component#decorateInternal}.  Considered protected.
<a name="line364"></a> * @param {Element} element Element (SplitPane div) to decorate.
<a name="line365"></a> * @protected
<a name="line366"></a> * @override
<a name="line367"></a> */
<a name="line368"></a>goog.ui.SplitPane.prototype.decorateInternal = function(element) {
<a name="line369"></a>  goog.base(this, &#39;decorateInternal&#39;, element);
<a name="line370"></a>
<a name="line371"></a>  this.setUpHandle_();
<a name="line372"></a>
<a name="line373"></a>  var elSize = goog.style.getBorderBoxSize(element);
<a name="line374"></a>  this.setSize(new goog.math.Size(elSize.width, elSize.height));
<a name="line375"></a>
<a name="line376"></a>  this.finishSetup_();
<a name="line377"></a>};
<a name="line378"></a>
<a name="line379"></a>
<a name="line380"></a>/**
<a name="line381"></a> * Parent the passed in components to the split containers.  Call their
<a name="line382"></a> * createDom methods if necessary.
<a name="line383"></a> * @private
<a name="line384"></a> */
<a name="line385"></a>goog.ui.SplitPane.prototype.finishSetup_ = function() {
<a name="line386"></a>  var dom = this.getDomHelper();
<a name="line387"></a>
<a name="line388"></a>  if (!this.firstComponent_.getElement()) {
<a name="line389"></a>    this.firstComponent_.createDom();
<a name="line390"></a>  }
<a name="line391"></a>
<a name="line392"></a>  dom.appendChild(this.firstComponentContainer_,
<a name="line393"></a>      this.firstComponent_.getElement());
<a name="line394"></a>
<a name="line395"></a>  if (!this.secondComponent_.getElement()) {
<a name="line396"></a>    this.secondComponent_.createDom();
<a name="line397"></a>  }
<a name="line398"></a>
<a name="line399"></a>  dom.appendChild(this.secondComponentContainer_,
<a name="line400"></a>      this.secondComponent_.getElement());
<a name="line401"></a>
<a name="line402"></a>  this.splitDragger_ = new goog.fx.Dragger(this.splitpaneHandle_,
<a name="line403"></a>      this.splitpaneHandle_);
<a name="line404"></a>
<a name="line405"></a>  this.firstComponentContainer_.style.position = &#39;absolute&#39;;
<a name="line406"></a>  this.secondComponentContainer_.style.position = &#39;absolute&#39;;
<a name="line407"></a>  var handleStyle = this.splitpaneHandle_.style;
<a name="line408"></a>  handleStyle.position = &#39;absolute&#39;;
<a name="line409"></a>  handleStyle.overflow = &#39;hidden&#39;;
<a name="line410"></a>  handleStyle.zIndex =
<a name="line411"></a>      goog.ui.SplitPane.IframeOverlayIndex_.SPLITTER_HANDLE;
<a name="line412"></a>};
<a name="line413"></a>
<a name="line414"></a>
<a name="line415"></a>/**
<a name="line416"></a> * Setup all events and do an initial resize.
<a name="line417"></a> * @override
<a name="line418"></a> */
<a name="line419"></a>goog.ui.SplitPane.prototype.enterDocument = function() {
<a name="line420"></a>  goog.base(this, &#39;enterDocument&#39;);
<a name="line421"></a>
<a name="line422"></a>  // If position is not set in the inline style of the element, it is not
<a name="line423"></a>  // possible to get the element&#39;s real CSS position until the element is in
<a name="line424"></a>  // the document.
<a name="line425"></a>  // When position:relative is set in the CSS and the element is not in the
<a name="line426"></a>  // document, Safari, Chrome, and Opera always return the empty string; while
<a name="line427"></a>  // IE always return &quot;static&quot;.
<a name="line428"></a>  // Do the final check to see if element&#39;s position is set as &quot;relative&quot;,
<a name="line429"></a>  // &quot;absolute&quot; or &quot;fixed&quot;.
<a name="line430"></a>  var element = this.getElement();
<a name="line431"></a>  if (goog.style.getComputedPosition(element) == &#39;static&#39;) {
<a name="line432"></a>    element.style.position = &#39;relative&#39;;
<a name="line433"></a>  }
<a name="line434"></a>
<a name="line435"></a>  this.getHandler().
<a name="line436"></a>      listen(this.splitpaneHandle_, goog.events.EventType.DBLCLICK,
<a name="line437"></a>          this.handleDoubleClick_).
<a name="line438"></a>      listen(this.splitDragger_, goog.fx.Dragger.EventType.START,
<a name="line439"></a>          this.handleDragStart_).
<a name="line440"></a>      listen(this.splitDragger_, goog.fx.Dragger.EventType.DRAG,
<a name="line441"></a>          this.handleDrag_).
<a name="line442"></a>      listen(this.splitDragger_, goog.fx.Dragger.EventType.END,
<a name="line443"></a>          this.handleDragEnd_);
<a name="line444"></a>
<a name="line445"></a>  this.setFirstComponentSize(this.initialSize_);
<a name="line446"></a>};
<a name="line447"></a>
<a name="line448"></a>
<a name="line449"></a>/**
<a name="line450"></a> * Sets the initial size of the left or top component.
<a name="line451"></a> * @param {number} size The size in Pixels of the container.
<a name="line452"></a> */
<a name="line453"></a>goog.ui.SplitPane.prototype.setInitialSize = function(size) {
<a name="line454"></a>  this.initialSize_ = size;
<a name="line455"></a>};
<a name="line456"></a>
<a name="line457"></a>
<a name="line458"></a>/**
<a name="line459"></a> * Sets the SplitPane handle size.
<a name="line460"></a> * TODO(user): Make sure this works after initialization.
<a name="line461"></a> * @param {number} size The size of the handle in pixels.
<a name="line462"></a> */
<a name="line463"></a>goog.ui.SplitPane.prototype.setHandleSize = function(size) {
<a name="line464"></a>  this.handleSize_ = size;
<a name="line465"></a>};
<a name="line466"></a>
<a name="line467"></a>
<a name="line468"></a>/**
<a name="line469"></a> * Sets whether we resize on handle drag.
<a name="line470"></a> * @param {boolean} continuous The continuous resize value.
<a name="line471"></a> */
<a name="line472"></a>goog.ui.SplitPane.prototype.setContinuousResize = function(continuous) {
<a name="line473"></a>  this.continuousResize_ = continuous;
<a name="line474"></a>};
<a name="line475"></a>
<a name="line476"></a>
<a name="line477"></a>/**
<a name="line478"></a> * Returns whether the orientation for the split pane is vertical
<a name="line479"></a> * or not.
<a name="line480"></a> * @return {boolean} True if the orientation is vertical, false otherwise.
<a name="line481"></a> */
<a name="line482"></a>goog.ui.SplitPane.prototype.isVertical = function() {
<a name="line483"></a>  return this.orientation_ == goog.ui.SplitPane.Orientation.VERTICAL;
<a name="line484"></a>};
<a name="line485"></a>
<a name="line486"></a>
<a name="line487"></a>/**
<a name="line488"></a> * Initializes the handle by assigning the correct height/width and adding
<a name="line489"></a> * the correct class as per the orientation.
<a name="line490"></a> * @private
<a name="line491"></a> */
<a name="line492"></a>goog.ui.SplitPane.prototype.setUpHandle_ = function() {
<a name="line493"></a>  if (this.isVertical()) {
<a name="line494"></a>    this.splitpaneHandle_.style.height = this.handleSize_ + &#39;px&#39;;
<a name="line495"></a>    goog.dom.classes.add(this.splitpaneHandle_,
<a name="line496"></a>        goog.ui.SplitPane.HANDLE_CLASS_NAME_VERTICAL_);
<a name="line497"></a>  } else {
<a name="line498"></a>    this.splitpaneHandle_.style.width = this.handleSize_ + &#39;px&#39;;
<a name="line499"></a>    goog.dom.classes.add(this.splitpaneHandle_,
<a name="line500"></a>        goog.ui.SplitPane.HANDLE_CLASS_NAME_HORIZONTAL_);
<a name="line501"></a>  }
<a name="line502"></a>};
<a name="line503"></a>
<a name="line504"></a>
<a name="line505"></a>/**
<a name="line506"></a> * Sets the orientation class for the split pane handle.
<a name="line507"></a> * @protected
<a name="line508"></a> */
<a name="line509"></a>goog.ui.SplitPane.prototype.setOrientationClassForHandle = function() {
<a name="line510"></a>  if (this.isVertical()) {
<a name="line511"></a>    goog.dom.classes.swap(this.splitpaneHandle_,
<a name="line512"></a>                          goog.ui.SplitPane.HANDLE_CLASS_NAME_HORIZONTAL_,
<a name="line513"></a>                          goog.ui.SplitPane.HANDLE_CLASS_NAME_VERTICAL_);
<a name="line514"></a>  } else {
<a name="line515"></a>    goog.dom.classes.swap(this.splitpaneHandle_,
<a name="line516"></a>                          goog.ui.SplitPane.HANDLE_CLASS_NAME_VERTICAL_,
<a name="line517"></a>                          goog.ui.SplitPane.HANDLE_CLASS_NAME_HORIZONTAL_);
<a name="line518"></a>  }
<a name="line519"></a>};
<a name="line520"></a>
<a name="line521"></a>
<a name="line522"></a>/**
<a name="line523"></a> * Sets the orientation of the split pane.
<a name="line524"></a> * @param {goog.ui.SplitPane.Orientation} orientation SplitPane orientation.
<a name="line525"></a> */
<a name="line526"></a>goog.ui.SplitPane.prototype.setOrientation = function(orientation) {
<a name="line527"></a>  if (this.orientation_ != orientation) {
<a name="line528"></a>    this.orientation_ = orientation;
<a name="line529"></a>    var isVertical = this.isVertical();
<a name="line530"></a>
<a name="line531"></a>    // If the split pane is already in document, then the positions and sizes
<a name="line532"></a>    // need to be adjusted.
<a name="line533"></a>    if (this.isInDocument()) {
<a name="line534"></a>      this.setOrientationClassForHandle();
<a name="line535"></a>      // TODO(user): Should handleSize_ and initialSize_ also be adjusted ?
<a name="line536"></a>      if (goog.isNumber(this.firstComponentSize_)) {
<a name="line537"></a>        var splitpaneSize = goog.style.getBorderBoxSize(this.getElement());
<a name="line538"></a>        var ratio = isVertical ? splitpaneSize.height / splitpaneSize.width :
<a name="line539"></a>            splitpaneSize.width / splitpaneSize.height;
<a name="line540"></a>        // TODO(user): Fix the behaviour for the case when the handle is
<a name="line541"></a>        // placed on either of  the edges of the split pane. Also, similar
<a name="line542"></a>        // behaviour is present in {@link #setSize}. Probably need to modify
<a name="line543"></a>        // {@link #setFirstComponentSize}.
<a name="line544"></a>        this.setFirstComponentSize(this.firstComponentSize_ * ratio);
<a name="line545"></a>      } else {
<a name="line546"></a>        this.setFirstComponentSize();
<a name="line547"></a>      }
<a name="line548"></a>    }
<a name="line549"></a>  }
<a name="line550"></a>};
<a name="line551"></a>
<a name="line552"></a>
<a name="line553"></a>/**
<a name="line554"></a> * Gets the orientation of the split pane.
<a name="line555"></a> * @return {goog.ui.SplitPane.Orientation} The orientation.
<a name="line556"></a> */
<a name="line557"></a>goog.ui.SplitPane.prototype.getOrientation = function() {
<a name="line558"></a>  return this.orientation_;
<a name="line559"></a>};
<a name="line560"></a>
<a name="line561"></a>
<a name="line562"></a>/**
<a name="line563"></a> * Move and resize a container.  The sizing changes the BorderBoxSize.
<a name="line564"></a> * @param {Element} element The element to move and size.
<a name="line565"></a> * @param {goog.math.Rect} rect The top, left, width and height to change to.
<a name="line566"></a> * @private
<a name="line567"></a> */
<a name="line568"></a>goog.ui.SplitPane.prototype.moveAndSize_ = function(element, rect) {
<a name="line569"></a>
<a name="line570"></a>  goog.style.setPosition(element, rect.left, rect.top);
<a name="line571"></a>  // TODO(user): Add a goog.math.Size.max call for below.
<a name="line572"></a>  goog.style.setBorderBoxSize(element,
<a name="line573"></a>      new goog.math.Size(Math.max(rect.width, 0), Math.max(rect.height, 0)));
<a name="line574"></a>};
<a name="line575"></a>
<a name="line576"></a>
<a name="line577"></a>/**
<a name="line578"></a> * @return {?number} The size of the left/top component.
<a name="line579"></a> */
<a name="line580"></a>goog.ui.SplitPane.prototype.getFirstComponentSize = function() {
<a name="line581"></a>  return this.firstComponentSize_;
<a name="line582"></a>};
<a name="line583"></a>
<a name="line584"></a>
<a name="line585"></a>/**
<a name="line586"></a> * Set the size of the left/top component, and resize the other component based
<a name="line587"></a> * on that size and handle size.
<a name="line588"></a> * @param {?number=} opt_size The size of the top or left, in pixels.
<a name="line589"></a> */
<a name="line590"></a>goog.ui.SplitPane.prototype.setFirstComponentSize = function(opt_size) {
<a name="line591"></a>  var top = 0, left = 0;
<a name="line592"></a>  var splitpaneSize = goog.style.getBorderBoxSize(this.getElement());
<a name="line593"></a>
<a name="line594"></a>  var isVertical = this.isVertical();
<a name="line595"></a>  // Figure out first component size; it&#39;s either passed in, taken from the
<a name="line596"></a>  // saved size, or is half of the total size.
<a name="line597"></a>  var firstComponentSize = goog.isNumber(opt_size) ? opt_size :
<a name="line598"></a>      goog.isNumber(this.firstComponentSize_) ? this.firstComponentSize_ :
<a name="line599"></a>      Math.floor((isVertical ? splitpaneSize.height : splitpaneSize.width) / 2);
<a name="line600"></a>  this.firstComponentSize_ = firstComponentSize;
<a name="line601"></a>
<a name="line602"></a>  var firstComponentWidth;
<a name="line603"></a>  var firstComponentHeight;
<a name="line604"></a>  var secondComponentWidth;
<a name="line605"></a>  var secondComponentHeight;
<a name="line606"></a>  var handleWidth;
<a name="line607"></a>  var handleHeight;
<a name="line608"></a>  var secondComponentLeft;
<a name="line609"></a>  var secondComponentTop;
<a name="line610"></a>  var handleLeft;
<a name="line611"></a>  var handleTop;
<a name="line612"></a>
<a name="line613"></a>  if (isVertical) {
<a name="line614"></a>
<a name="line615"></a>    // Width for the handle and the first and second components will be the
<a name="line616"></a>    // width of the split pane. The height for the first component will be
<a name="line617"></a>    // the calculated first component size. The height for the second component
<a name="line618"></a>    // will be the  total height minus the heights of the first component and
<a name="line619"></a>    // the handle.
<a name="line620"></a>    firstComponentHeight = firstComponentSize;
<a name="line621"></a>    firstComponentWidth = splitpaneSize.width;
<a name="line622"></a>    handleWidth = splitpaneSize.width;
<a name="line623"></a>    handleHeight = this.handleSize_;
<a name="line624"></a>    secondComponentHeight = splitpaneSize.height - firstComponentHeight -
<a name="line625"></a>        handleHeight;
<a name="line626"></a>    secondComponentWidth = splitpaneSize.width;
<a name="line627"></a>    handleTop = top + firstComponentHeight;
<a name="line628"></a>    handleLeft = left;
<a name="line629"></a>    secondComponentTop = handleTop + handleHeight;
<a name="line630"></a>    secondComponentLeft = left;
<a name="line631"></a>  } else {
<a name="line632"></a>
<a name="line633"></a>    // Height for the handle and the first and second components will be the
<a name="line634"></a>    // height of the split pane. The width for the first component will be
<a name="line635"></a>    // the calculated first component size. The width for the second component
<a name="line636"></a>    // will be the  total width minus the widths of the first component and
<a name="line637"></a>    // the handle.
<a name="line638"></a>    firstComponentWidth = firstComponentSize;
<a name="line639"></a>    firstComponentHeight = splitpaneSize.height;
<a name="line640"></a>    handleWidth = this.handleSize_;
<a name="line641"></a>    handleHeight = splitpaneSize.height;
<a name="line642"></a>    secondComponentWidth = splitpaneSize.width - firstComponentWidth -
<a name="line643"></a>        handleWidth;
<a name="line644"></a>    secondComponentHeight = splitpaneSize.height;
<a name="line645"></a>    handleLeft = left + firstComponentWidth;
<a name="line646"></a>    handleTop = top;
<a name="line647"></a>    secondComponentLeft = handleLeft + handleWidth;
<a name="line648"></a>    secondComponentTop = top;
<a name="line649"></a>  }
<a name="line650"></a>
<a name="line651"></a>  // Now move and size the containers.
<a name="line652"></a>  this.moveAndSize_(this.firstComponentContainer_,
<a name="line653"></a>      new goog.math.Rect(left, top, firstComponentWidth, firstComponentHeight));
<a name="line654"></a>
<a name="line655"></a>  if (typeof this.firstComponent_.resize == &#39;function&#39;) {
<a name="line656"></a>    this.firstComponent_.resize(new goog.math.Size(
<a name="line657"></a>        firstComponentWidth, firstComponentHeight));
<a name="line658"></a>  }
<a name="line659"></a>
<a name="line660"></a>  this.moveAndSize_(this.splitpaneHandle_, new goog.math.Rect(handleLeft,
<a name="line661"></a>      handleTop, handleWidth, handleHeight));
<a name="line662"></a>
<a name="line663"></a>  this.moveAndSize_(this.secondComponentContainer_,
<a name="line664"></a>      new goog.math.Rect(secondComponentLeft, secondComponentTop,
<a name="line665"></a>          secondComponentWidth, secondComponentHeight));
<a name="line666"></a>
<a name="line667"></a>  if (typeof this.secondComponent_.resize == &#39;function&#39;) {
<a name="line668"></a>    this.secondComponent_.resize(new goog.math.Size(secondComponentWidth,
<a name="line669"></a>        secondComponentHeight));
<a name="line670"></a>  }
<a name="line671"></a>  // Fire a CHANGE event.
<a name="line672"></a>  this.dispatchEvent(goog.ui.Component.EventType.CHANGE);
<a name="line673"></a>};
<a name="line674"></a>
<a name="line675"></a>
<a name="line676"></a>/**
<a name="line677"></a> * Dummy object to work around compiler warning.
<a name="line678"></a> * TODO(arv): Fix compiler or refactor to not depend on resize()
<a name="line679"></a> * @private
<a name="line680"></a> * @type {Object}
<a name="line681"></a> */
<a name="line682"></a>goog.ui.SplitPane.resizeWarningWorkaround_ = {
<a name="line683"></a>  /**
<a name="line684"></a>   * @param {goog.math.Size} size The new size.
<a name="line685"></a>   */
<a name="line686"></a>  resize: function(size) {}
<a name="line687"></a>};
<a name="line688"></a>
<a name="line689"></a>
<a name="line690"></a>/**
<a name="line691"></a>  * Set the size of the splitpane.  This is usually called by the controlling
<a name="line692"></a>  * application.  This will set the SplitPane BorderBoxSize.
<a name="line693"></a>  * @param {goog.math.Size} size The size to set the splitpane.
<a name="line694"></a>  */
<a name="line695"></a>goog.ui.SplitPane.prototype.setSize = function(size) {
<a name="line696"></a>  goog.style.setBorderBoxSize(this.getElement(), size);
<a name="line697"></a>  if (this.iframeOverlay_) {
<a name="line698"></a>    goog.style.setBorderBoxSize(this.iframeOverlay_, size);
<a name="line699"></a>  }
<a name="line700"></a>  this.setFirstComponentSize();
<a name="line701"></a>};
<a name="line702"></a>
<a name="line703"></a>
<a name="line704"></a>/**
<a name="line705"></a> * Snap the container to the left or top on a Double-click.
<a name="line706"></a> * @private
<a name="line707"></a> */
<a name="line708"></a>goog.ui.SplitPane.prototype.snapIt_ = function() {
<a name="line709"></a>  var handlePos = goog.style.getRelativePosition(this.splitpaneHandle_,
<a name="line710"></a>      this.firstComponentContainer_);
<a name="line711"></a>  var firstBorderBoxSize =
<a name="line712"></a>      goog.style.getBorderBoxSize(this.firstComponentContainer_);
<a name="line713"></a>  var firstContentBoxSize =
<a name="line714"></a>      goog.style.getContentBoxSize(this.firstComponentContainer_);
<a name="line715"></a>
<a name="line716"></a>  var isVertical = this.isVertical();
<a name="line717"></a>
<a name="line718"></a>  // Where do we snap the handle (what size to make the component) and what
<a name="line719"></a>  // is the current handle position.
<a name="line720"></a>  var snapSize;
<a name="line721"></a>  var handlePosition;
<a name="line722"></a>  if (isVertical) {
<a name="line723"></a>    snapSize = firstBorderBoxSize.height - firstContentBoxSize.height;
<a name="line724"></a>    handlePosition = handlePos.y;
<a name="line725"></a>  } else {
<a name="line726"></a>    snapSize = firstBorderBoxSize.width - firstContentBoxSize.width;
<a name="line727"></a>    handlePosition = handlePos.x;
<a name="line728"></a>  }
<a name="line729"></a>
<a name="line730"></a>  if (snapSize == handlePosition) {
<a name="line731"></a>    // This means we&#39;re &#39;unsnapping&#39;, set it back to where it was.
<a name="line732"></a>    this.setFirstComponentSize(this.savedSnapSize_);
<a name="line733"></a>  } else {
<a name="line734"></a>    // This means we&#39;re &#39;snapping&#39;, set the size to snapSize, and hide the
<a name="line735"></a>    // first component.
<a name="line736"></a>    if (isVertical) {
<a name="line737"></a>      this.savedSnapSize_ = goog.style.getBorderBoxSize(
<a name="line738"></a>          this.firstComponentContainer_).height;
<a name="line739"></a>    } else {
<a name="line740"></a>      this.savedSnapSize_ = goog.style.getBorderBoxSize(
<a name="line741"></a>          this.firstComponentContainer_).width;
<a name="line742"></a>    }
<a name="line743"></a>    this.setFirstComponentSize(snapSize);
<a name="line744"></a>  }
<a name="line745"></a>};
<a name="line746"></a>
<a name="line747"></a>
<a name="line748"></a>/**
<a name="line749"></a> * Handle the start drag event - set up the dragger.
<a name="line750"></a> * @param {goog.events.Event} e The event.
<a name="line751"></a> * @private
<a name="line752"></a> */
<a name="line753"></a>goog.ui.SplitPane.prototype.handleDragStart_ = function(e) {
<a name="line754"></a>
<a name="line755"></a>  // Setup iframe overlay to prevent iframes from grabbing events.
<a name="line756"></a>  if (!this.iframeOverlay_) {
<a name="line757"></a>    // Create the overlay.
<a name="line758"></a>    var cssStyles = &#39;position: relative&#39;;
<a name="line759"></a>
<a name="line760"></a>    if (goog.userAgent.IE) {
<a name="line761"></a>      // IE doesn&#39;t look at this div unless it has a background, so we&#39;ll
<a name="line762"></a>      // put one on, but make it opaque.
<a name="line763"></a>      cssStyles += &#39;;background-color: #000;filter: Alpha(Opacity=0)&#39;;
<a name="line764"></a>    }
<a name="line765"></a>    this.iframeOverlay_ =
<a name="line766"></a>        this.getDomHelper().createDom(&#39;div&#39;, {&#39;style&#39;: cssStyles});
<a name="line767"></a>
<a name="line768"></a>    this.getDomHelper().appendChild(this.getElement(), this.iframeOverlay_);
<a name="line769"></a>  }
<a name="line770"></a>  this.iframeOverlay_.style.zIndex =
<a name="line771"></a>      goog.ui.SplitPane.IframeOverlayIndex_.OVERLAY;
<a name="line772"></a>
<a name="line773"></a>  goog.style.setBorderBoxSize(this.iframeOverlay_,
<a name="line774"></a>      goog.style.getBorderBoxSize(this.getElement()));
<a name="line775"></a>
<a name="line776"></a>  var pos = goog.style.getPosition(this.firstComponentContainer_);
<a name="line777"></a>
<a name="line778"></a>  // For the size of the limiting box, we add the container content box sizes
<a name="line779"></a>  // so that if the handle is placed all the way to the end or the start, the
<a name="line780"></a>  // border doesn&#39;t exceed the total size. For position, we add the difference
<a name="line781"></a>  // between the border box and content box sizes of the first container to the
<a name="line782"></a>  // position of the first container. The start position should be such that
<a name="line783"></a>  // there is no overlap of borders.
<a name="line784"></a>  var limitWidth = 0;
<a name="line785"></a>  var limitHeight = 0;
<a name="line786"></a>  var limitx = pos.x;
<a name="line787"></a>  var limity = pos.y;
<a name="line788"></a>  var firstBorderBoxSize =
<a name="line789"></a>      goog.style.getBorderBoxSize(this.firstComponentContainer_);
<a name="line790"></a>  var firstContentBoxSize =
<a name="line791"></a>      goog.style.getContentBoxSize(this.firstComponentContainer_);
<a name="line792"></a>  var secondContentBoxSize =
<a name="line793"></a>      goog.style.getContentBoxSize(this.secondComponentContainer_);
<a name="line794"></a>  if (this.isVertical()) {
<a name="line795"></a>    limitHeight = firstContentBoxSize.height + secondContentBoxSize.height;
<a name="line796"></a>    limity += firstBorderBoxSize.height - firstContentBoxSize.height;
<a name="line797"></a>  } else {
<a name="line798"></a>    limitWidth = firstContentBoxSize.width + secondContentBoxSize.width;
<a name="line799"></a>    limitx += firstBorderBoxSize.width - firstContentBoxSize.width;
<a name="line800"></a>  }
<a name="line801"></a>  var limits = new goog.math.Rect(limitx, limity, limitWidth, limitHeight);
<a name="line802"></a>  this.splitDragger_.setLimits(limits);
<a name="line803"></a>};
<a name="line804"></a>
<a name="line805"></a>
<a name="line806"></a>/**
<a name="line807"></a> * Find the location relative to the splitpane.
<a name="line808"></a> * @param {number} left The x location relative to the window.
<a name="line809"></a> * @return {number} The relative x location.
<a name="line810"></a> * @private
<a name="line811"></a> */
<a name="line812"></a>goog.ui.SplitPane.prototype.getRelativeLeft_ = function(left) {
<a name="line813"></a>  return left - goog.style.getPosition(this.firstComponentContainer_).x;
<a name="line814"></a>};
<a name="line815"></a>
<a name="line816"></a>
<a name="line817"></a>/**
<a name="line818"></a> * Find the location relative to the splitpane.
<a name="line819"></a> * @param {number} top The y location relative to the window.
<a name="line820"></a> * @return {number} The relative y location.
<a name="line821"></a> * @private
<a name="line822"></a> */
<a name="line823"></a>goog.ui.SplitPane.prototype.getRelativeTop_ = function(top) {
<a name="line824"></a>  return top - goog.style.getPosition(this.firstComponentContainer_).y;
<a name="line825"></a>};
<a name="line826"></a>
<a name="line827"></a>
<a name="line828"></a>/**
<a name="line829"></a> * Handle the drag event. Move the containers.
<a name="line830"></a> * @param {goog.events.Event} e The event.
<a name="line831"></a> * @private
<a name="line832"></a> */
<a name="line833"></a>goog.ui.SplitPane.prototype.handleDrag_ = function(e) {
<a name="line834"></a>  if (this.continuousResize_) {
<a name="line835"></a>    if (this.isVertical()) {
<a name="line836"></a>      var top = this.getRelativeTop_(e.top);
<a name="line837"></a>      this.setFirstComponentSize(top);
<a name="line838"></a>    } else {
<a name="line839"></a>      var left = this.getRelativeLeft_(e.left);
<a name="line840"></a>      this.setFirstComponentSize(left);
<a name="line841"></a>    }
<a name="line842"></a>    this.dispatchEvent(goog.ui.SplitPane.EventType.HANDLE_DRAG);
<a name="line843"></a>  }
<a name="line844"></a>};
<a name="line845"></a>
<a name="line846"></a>
<a name="line847"></a>/**
<a name="line848"></a> * Handle the drag end event. If we&#39;re not doing continuous resize,
<a name="line849"></a> * resize the component.  If we&#39;re doing continuous resize, the component
<a name="line850"></a> * is already the correct size.
<a name="line851"></a> * @param {goog.events.Event} e The event.
<a name="line852"></a> * @private
<a name="line853"></a> */
<a name="line854"></a>goog.ui.SplitPane.prototype.handleDragEnd_ = function(e) {
<a name="line855"></a>  // Push iframe overlay down.
<a name="line856"></a>  this.iframeOverlay_.style.zIndex =
<a name="line857"></a>      goog.ui.SplitPane.IframeOverlayIndex_.HIDDEN;
<a name="line858"></a>  if (!this.continuousResize_) {
<a name="line859"></a>    if (this.isVertical()) {
<a name="line860"></a>      var top = this.getRelativeTop_(e.top);
<a name="line861"></a>      this.setFirstComponentSize(top);
<a name="line862"></a>    } else {
<a name="line863"></a>      var left = this.getRelativeLeft_(e.left);
<a name="line864"></a>      this.setFirstComponentSize(left);
<a name="line865"></a>    }
<a name="line866"></a>  }
<a name="line867"></a>
<a name="line868"></a>  this.dispatchEvent(goog.ui.SplitPane.EventType.HANDLE_DRAG_END);
<a name="line869"></a>};
<a name="line870"></a>
<a name="line871"></a>
<a name="line872"></a>/**
<a name="line873"></a> * Handle the Double-click. Call the snapIt method which snaps the container
<a name="line874"></a> * to the top or left.
<a name="line875"></a> * @param {goog.events.Event} e The event.
<a name="line876"></a> * @private
<a name="line877"></a> */
<a name="line878"></a>goog.ui.SplitPane.prototype.handleDoubleClick_ = function(e) {
<a name="line879"></a>  this.snapIt_();
<a name="line880"></a>};
<a name="line881"></a>
<a name="line882"></a>
<a name="line883"></a>/** @override */
<a name="line884"></a>goog.ui.SplitPane.prototype.disposeInternal = function() {
<a name="line885"></a>  goog.base(this, &#39;disposeInternal&#39;);
<a name="line886"></a>
<a name="line887"></a>  this.splitDragger_.dispose();
<a name="line888"></a>  this.splitDragger_ = null;
<a name="line889"></a>
<a name="line890"></a>  goog.dom.removeNode(this.iframeOverlay_);
<a name="line891"></a>  this.iframeOverlay_ = null;
<a name="line892"></a>};
</pre>


</body>
</html>
